#!/usr/bin/env sh

# remove old files
rm -f src/main/java/jupiter/asm/Lexer.java
rm -f src/main/java/jupiter/asm/Parser.java
rm -f src/main/java/jupiter/asm/Token.java
rm -f src/main/java/jupiter/gui/highlighting/Lexer.java

# generate lexer and parser
java -jar lib/jflex-full-1.7.0.jar src/syntax/lexer.flex -d src/main/java/jupiter/asm
java -jar lib/jflex-full-1.7.0.jar src/syntax/highlighter.flex -d src/main/java/jupiter/gui/highlighting
java -jar lib/java-cup-11b.jar -parser Parser -symbols Token -destdir src/main/java/jupiter/asm src/syntax/parser.cup
